
function checkName() {
	//获取姓名信息
	var custName = document.registerForm.custName.value;
	//执行验证
	let reg=/^[\u2E80-\u9FFF]+$/;//Unicode编码中的汉字范围
	if(!reg.test(custName)){
		$("#custName_error").html("&nbsp;<i class='layui-icon' style='color:darkred;';>&#x1007;</i>姓名输入不合法");
	}else{
		$("#custName_error").html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class='layui-icon' style='color:green;';>&#x1005;</i>");
	}
}

function checkmident() {
	//获取身份证信息
	var certNo = document.registerForm.certNo.value;
	//执行验证
	var reg = /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/;
	if(!reg.test(certNo)){
		$("#certNo_error").html("&nbsp;<i class='layui-icon' style='color:darkred;';>&#x1007;</i>此处是报错文件");
	}else{
		$("#certNo_error").html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class='layui-icon' style='color:green;';>&#x1005;</i>");
	}
}

function checkaddress() {
	//获取联系地址
	var address = document.registerForm.address.value;
	//执行验证
	let reg = /[\u4e00-\u9fa5]/;
	if (!reg.test(address)) {
		$("#address_error").html("&nbsp;<i class='layui-icon' style='color:darkred;';>&#x1007;</i>此处是报错文件");
	} else {
		$("#address_error").html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class='layui-icon' style='color:green;';>&#x1005;</i>");
	}
}


function checkmobile() {
	//获取电话号码
	var mobiles = document.registerForm.mobiles.value;
	//执行验证
	let reg = /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/;
	if (!reg.test(mobiles)) {
		$("#mobile_error").html("&nbsp;<i class='layui-icon' style='color:darkred;';>&#x1007;</i>电话号码11位");
	} else {
		$("#mobile_error").html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class='layui-icon' style='color:green;';>&#x1005;</i>");
	}
}


function checkloginPwd() {
	//获取密码
	var loginPwd = document.registerForm.loginPwd.value;
	//执行验证
	let reg = /^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$).{6,20}$/;
	if (!reg.test(loginPwd)) {
		$("#loginPwd_error").html("&nbsp;<i class='layui-icon' style='color:darkred;';>&#x1007;</i>密码格式错误");
	} else {
		$("#loginPwd_error").html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class='layui-icon' style='color:green;';>&#x1005;</i>");
	}
}


function checkreLoginPwd() {
	//获取验证密码
	var reLoginPwd = document.registerForm.reLoginPwd.value;
	//执行验证
	var loginPwd = document.registerForm.loginPwd.value;
	if (reLoginPwd!=loginPwd) {
		$("#reLoginPwd-correct").html("&nbsp;<i class='layui-icon' style='color:darkred;';>&#x1007;</i>密码不一致");
	} else if (reLoginPwd==loginPwd) {
		$("#reLoginPwd-correct").html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class='layui-icon' style='color:green;';>&#x1005;</i>");
	}
}


function checktxPwd() {
	//获取交易密码
	var txPwd = document.registerForm.txPwd.value;
	//执行验证
	let reg = /^[0-9]*[1-9][0-9]*$/;
	if (!reg.test(txPwd)) {
		$("#txPwd-correct").html("&nbsp;<i class='layui-icon' style='color:darkred;';>&#x1007;</i>密码格式错误");
	} else {
		$("#txPwd-correct").html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class='layui-icon' style='color:green;';>&#x1005;</i>");
	}
}


function checkreTxPwd() {
	//获取验证交易密码
	var reTxPwd = document.registerForm.reTxPwd.value;
	//执行验证
	var txPwd = document.registerForm.txPwd.value;
	if (txPwd!=reTxPwd) {
		$("#reTxPwd-correct").html("&nbsp;<i class='layui-icon' style='color:darkred;';>&#x1007;</i>密码不一致");
	} else if (txPwd==reTxPwd){
		$("#reTxPwd-correct").html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class='layui-icon' style='color:green;';>&#x1005;</i>");
	}
}